// 引入初始化样式
import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
// 导入图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 导入pinia
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// 测试接口
// import {getTestAPI} from '@/apis/testAPI'
// getTestAPI().then((res)=>{
//   console.log(res);
// })



const app = createApp(App)
// 注册持久化插件
const pinia=createPinia()
app.use(pinia)
pinia.use(piniaPluginPersistedstate)

app.use(router)

app.mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}